package start.test.ec;

//奢侈品 在普通商品基础上加收20%
public class Luxury extends Commodity{
    private Commodity commodity;//包装一个有价值的商品

    public Luxury(Commodity commodity) {
        super(commodity.getValue());
        this.commodity = commodity;
    }

    @Override
    public double taxes() {
        return commodity.taxes()+commodity.getValue()*0.2;
    }
}
